My spots dont work

  1. What do you want to achieve? Keep it simple and clear!
    I want to make the spots work better

  2. What is the issue? Include screenshots / videos if possible!
    So when i get on the spot the spot works but when i walk it stops working

robloxapp-20220816-1429159.wmv (2.0 MB)

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I did tryed to make it so it disables the walk speed but it didnt work

This is not a troll

So first we need your spots script

local taken = false 
script.Parent.Touched:Connect(function(Player)
	if not taken then 
		if game.Players:GetPlayerFromCharacter(Player.Parent)then 
			taken = true 
			Player.Parent.Humanoid.WalkSpeed = 0 
			Player.Parent:MoveTo(script.Parent.Position) 
			script.Parent.BrickColor = BrickColor.new("Baby blue") 
		else
			return false
		end
	else
		return false
	end
end)

So i think you will found the issue due to adding some print functions

local taken = false 
script.Parent.Touched:Connect(function(Player)
	if taken == false then 
		print("Taken is false")
		if game.Players:GetPlayerFromCharacter(Player.Parent)then 
			print("Touched is player")
			taken = true 
			Player.Parent.Humanoid.WalkSpeed = 0 
			Player.Parent:MoveTo(script.Parent.Position) 
			script.Parent.BrickColor = BrickColor.new("Baby blue") 
		else
			print("Touched is not a player: "..Player.Name)
			return false
		end
	else
		print("Taken is true")
		return false
	end
end)
1 Like

Ohh okay thanks for helping! I will try this

1 Like

I wanna know - does it helped? If yes, make sure to mark my response as solution

1 Like