I made as script so where, when you jump on a the object that you're touching, it's suppose to fling the character who touched it back. but for some reason it's not working, nor is it outputting errors. Help!
Local Script
script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("UpperTorso") then
script.Parent.PushBack:FireServer(hit)
end
end)
Server Script
db = true
script.Parent.PushBack.OnServerEvent:Connect(function(hit)
if db then
db = false
local torso = hit.Parent.UpperTorso
torso.Velocity = (torso.CFrame.lookVector) * -100
wait(2)
db = true
end
end)
[

4 comments
LocalScripts will not run in the Workspace.
@RobloxWhizYT Okay I fixed that, now it's outputting errors and it's talking about how torso is a nil value, even though my character is in R15 2.0 and has an UpperTorso...
Try checking for the HumanoidRootPart instead of the UpperTorso.
On the server Script on line three do "script.Parent.PushBack.OnServerEvent:Connect(function(Player,hit)" That player is always supposed to be there