Why does this script delay a part by one second?
It works at first but then 1 second later it teleports, even when I'm not touching it?
07 | place = workspace.ToSpawn |
08 | script.Parent.Touched:connect( function (hit) |
09 | if game.Players:GetPlayerFromCharacter(hit.Parent) and ( not cooldown) then |
11 | local plr = game.Players:GetPlayerFromCharacter(hit.Parent) |
12 | local chr = plr.Character |
13 | for i,v in pairs (table) do |
15 | script.Parent.CanCollide = false |
16 | script.Parent.Transparency = . 3 |
18 | script.Parent.CanCollide = true |
19 | script.Parent.Transparency = 0 |
22 | chr:WaitForChild( "HumanoidRootPart" ) |
23 | chr.HumanoidRootPart.CFrame = place.CFrame + Vector 3. new( 0 , 2 , 0 ) |
Not sure at all, is it waiting then going back to it?