Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to make a touched event work past when it is touched?

Asked by 2 years ago

I have this bloxy cola that I want to move upon being touched, and I want it to stay there. It successfully goes to that position, but as soon as I step off where its original position was, it teleports back there. How would I fix this?

game.Workspace.obby.ending.BloxyCola.Touched:Connect(function(Hit)
    if Hit.Parent:FindFirstChild("Humanoid") then
        game.Workspace.obby.ending.BloxyCola.Position = Vector3.new(-627.98, -43.26, -3072.334)
        game.Workspace.obby.ending.BloxyCola.CanTouch = false
        print("cola moved")
    end

end)
0
Does the bloxy cola have any other scripts in it? VAnkata20 135 — 2y
0
Well it's a local script because I only want this to happen for the player that touched it, so the script is inside of StarterPlayerScripts, but yes, the cola has a script that makes it spin, and one that makes you get a cola tool when it's touched. Stiles8353 35 — 2y
0
It was the spinscript, even though it interferes with the orientation, not it's position. Stiles8353 35 — 2y

1 answer

Log in to vote
0
Answered by 2 years ago

Figured out the spinscript I had inside of it was causing the problem.

Ad

Answer this question