I have it with a remove Event. I am trying to make it teleport a person which the username of the person is in the Server Script Storage Script as User.
This is in the LocalScript
local Name = game.Players script.Parent.MouseButton1Click:Connect(function() game.ReplicatedStorage.Queue1:FireServer(Name.LocalPlayer) end)
And this is in Server Script Storage
SpotI = game.Workspace.Queue1.SpotI BringHere = game.Workspace.Queue1.SpotO User = game.Workspace.Queue1.SpotOI.UserHere.Value game.ReplicatedStorage.Queue1.OnServerEvent:Connect(function(PlayerHere) User = PlayerHere.Name SpotI.Touched:Connect(function(part) if part.Parent.Humanoid then if part.Parent.Humanoid.Health > 0 then PlayerHere:MoveTo(BringHere.Position) end end end) end)
SpotI = game.Workspace.Queue1.SpotI BringHere = game.Workspace.Queue1.SpotO User = game.Workspace.Queue1.SpotOI.UserHere.Value game.ReplicatedStorage.Queue1.OnServerEvent:Connect(function(PlayerHere) User = PlayerHere.Name game.Players[User].Character:MoveTo(BringHere.Position) print ("Works") end)
The problem was the ServerScriptStorage Script. This one works!