Welcome to the Forums!
Join thousands of other Roblox members with a free account.
Create Forum Account

teleporting to position until stay at that position not working

  • This website was created by Roblox members to replace the official forums (because Roblox shut them down) Join us if you like Roblox!
Status
Not open for further replies.

Shavow

New Member
Reputation: 0 / 0 / 0
Apr 11, 2021
7
0
1
Roblox
versuiv
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.
 

Shavow

New Member
Reputation: 0 / 0 / 0
Apr 11, 2021
7
0
1
Roblox
versuiv
Um... Do you know you can get banned from game for using other scripts in it?
yeah lol, and I'm cant delete them, oh well. Nothing much i can do now, "how it feels to be exposed :(" at least they give me a 1 day ban because im doing it for learning purposes but its fine
 

CallMeKY

Moderator
Ultra
Reputation: 7 / 0 / 0
Feb 25, 2018
1,741
94
863
113
Maine, USA
Roblox
CallMeKY
Discord
CallMeKY#5012
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.
 

Shavow

New Member
Reputation: 0 / 0 / 0
Apr 11, 2021
7
0
1
Roblox
versuiv
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
 
Status
Not open for further replies.