Script:
local players = game:GetService("Players")
local jumpparts = game.Workspace.JumpParts
game.ReplicatedStorage.PlayerEvents.Jump.OnServerEvent:Connect(function(x,plr)
for a,b in pairs(jumpparts:GetChildren()) do
for i,v in pairs(players:GetPlayers()) do
coroutine.wrap(function()
if plr:WaitForChild("Jumped").Value == true then
local character = v.Character or v.CharacterAdded:Wait()
local humanoidRootpart = character:WaitForChild("HumanoidRootPart")
if (b.Position - humanoidRootpart.Position).magnitude < 50 then -- this distance for test.
warn("INRANGE")
end
end
end)()
end
end
end)
my problem: this script takes the script.
Error: Workspace.JumpParts.Script:6: Position is not a valid member of Script “Workspace.JumpParts.Script”