do it again, i found Unicode in the given script
remember to add a part that is marked as the target position
It still doesn’t work. I don’t understand.
the touch = on the last few lines is yellow
Are u using a local script in workspace?
If Yes, Local Scripts don’t work in workspace, That should be why it is not working.
If No, Use
local part = script.Parent
local Debounce = false
part.Touched:Connect(function(hit)
local Character = hit.Parent
local Player = game:GetService("Players"):GetPlayerFromCharacter(Character)
if not Player then return end
if not Debounce then
Debounce = true
Character:PivotTo(CFrame.new(46, 60.25, -110.669))
task.wait(2)
Debounce = false
end
end)
Helloo,
I’ve recreated the code and tested it, it should work now
local touched = false
script.Parent.Touched:Connect(function(hit) -- Detect if the player is touching it
if hit.Parent:FindFirstChild("Humanoid") then -- if the "Hit" is the Humanoid
touched = true -- set bool to true
task.delay(2, function() -- Delay to check if the player is still touching it
if touched == true then -- if bool is set to true
hit.Parent:MoveTo(Vector3.new(46, 60.25, -110.669)) -- Change the CFrame of the Character
end
end)
end
end)
script.Parent.TouchEnded:Connect(function(hit) -- Detect if the player is NOT touching it
if hit.Parent:FindFirstChild("Humanoid") then -- if the "Hit" is the Humanoid
touched = false -- set bool to false
end
end)
(i replied to the wrong feedback lol)
i would appreciate a checkmark
1 Like
Thank you bro. This is fantastic!
1 Like
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.