Playing the game on an actual server:
Playing the game on Roblox Studio:
why is this happening ?
could this mean that I need to turn the script into a local script?
Here’s my script:
local parent = script.Parent
local jumping = false
hum = script.Parent.Parent.Parent.Parent.Parent:FindFirstChild("Humanoid")
hum:GetPropertyChangedSignal("FloorMaterial"):Connect(function()
--print("New value for FloorMaterial: " .. tostring(hum.FloorMaterial))
if hum.FloorMaterial == Enum.Material.Air then
parent.Enabled = false
else
parent.Enabled = true
end
end)
while task.wait(0.02) do
hum.Running:Connect(function(speed)
local moveDirMag = hum.MoveDirection.Magnitude
if moveDirMag > 0 and jumping == false and speed > 30 then
parent.Rate = 10
else
parent.Rate = 0
end
end)
end