Roblox Forum banner
1 - 5 of 5 Posts

· Registered
Joined
·
7 Posts
Discussion Starter · #1 ·
basically, I'm having a problem with this script I created, and I'm using it in a game called "bubble gum simulator"

local plr = game.Players.LocalPlayer.Character.HumanoidRootPart
local sellposition = CFrame.new(-91.9134, 45.7986, -97.9536) -- intended position

repeat
plr.CFrame = sellposition
wait(2)
until game.Players.LocalPlayer.Character.HumanoidRootPart == sellposition

and the game has an anti teleporting system that teleports you back to your original position, but eventually if you keep teleporting to that intended position you will stay there and not move back to your original position, so basically, what this script does is that it keeps teleporting you to your intended position until you have reached your favorable position for about 2 seconds
(game teleports you back to your original position within 2 seconds) and for some reason, the script doesn't end, but it meant to stop the script because I have reached my position for more than 2 seconds, but the script keeps running. Someone, please help me.
 

· Premium member
Joined
·
1,940 Posts
basically, I'm having a problem with this script I created, and I'm using it in a game called "bubble gum simulator"

local plr = game.Players.LocalPlayer.Character.HumanoidRootPart
local sellposition = CFrame.new(-91.9134, 45.7986, -97.9536) -- intended position

repeat
plr.CFrame = sellposition
wait(2)
until game.Players.LocalPlayer.Character.HumanoidRootPart == sellposition

and the game has an anti teleporting system that teleports you back to your original position, but eventually if you keep teleporting to that intended position you will stay there and not move back to your original position, so basically, what this script does is that it keeps teleporting you to your intended position until you have reached your favorable position for about 2 seconds
(game teleports you back to your original position within 2 seconds) and for some reason, the script doesn't end, but it meant to stop the script because I have reached my position for more than 2 seconds, but the script keeps running. Someone, please help me.
Games with exploit detection have several methods to determine if your movement is irregular. If you want something relatively simple that's nearly impossible to prevent without potentially ruining UX, I'd suggest checking out Pathfinding.
 

· Registered
Joined
·
7 Posts
Discussion Starter · #5 ·
basically, I'm having a problem with this script I created, and I'm using it in a game called "bubble gum simulator"

local plr = game.Players.LocalPlayer.Character.HumanoidRootPart
local sellposition = CFrame.new(-91.9134, 45.7986, -97.9536) -- intended position

repeat
plr.CFrame = sellposition
wait(2)
until game.Players.LocalPlayer.Character.HumanoidRootPart == sellposition

and the game has an anti teleporting system that teleports you back to your original position, but eventually if you keep teleporting to that intended position you will stay there and not move back to your original position, so basically, what this script does is that it keeps teleporting you to your intended position until you have reached your favorable position for about 2 seconds
(game teleports you back to your original position within 2 seconds) and for some reason, the script doesn't end, but it meant to stop the script because I have reached my position for more than 2 seconds, but the script keeps running. Someone, please help me.
Games with exploit detection have several methods to determine if your movement is irregular. If you want something relatively simple that's nearly impossible to prevent without potentially ruining UX, I'd suggest checking out Pathfinding.
this in fact did help me come up with a solution and it was to anchor the player once reached the destination and this made me not move back to my original position

like this -

getgenv().farmer = false; -- change to true

local plr = game.Players.LocalPlayer.Character.HumanoidRootPart
local pos = CFrame.new(301.144, 46.0061, -373.913)

while wait() do
if getgenv().farmer == true then
local A_1 = "PurchaseEgg"
local A_2 = "Cosmic Egg"
local A_3 = "Multi"
local Event = game:GetService("ReplicatedStorage").NetworkRemoteEvent
Event:FireServer(A_1, A_2, A_3)
plr.Anchored = true -- here is the addition
plr.CFrame = pos
wait(0.2)
end
end

-- you'll need to reset to stop the script
 
1 - 5 of 5 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top