So this script works in studio mode, however it doesn't work in a normal roblox test. I have tested it seeing if FilteringEnabled was the problem (it wasn't) i'm very unsure as to what the problem could be any help is appreciated! No Errors appear in the console

script.Parent.Touched:Connect(function(hit)
    if hit.Parent:FindFirstChild("Humanoid") then
		local tor = hit.Parent:FindFirstChild("HumanoidRootPart")
        tor.Velocity = script.Parent.CFrame.lookVector * 100
    end
end)

Thank you in advance!

13 comments

0

Is this in a script or local?

0

It's a server-side script

0

connect is deprecated, use Connect

0

nevermind didn't work

0

Any errors? Change "UpperTorso" to "HumanoidRootPart" since R6 and R15 characters both have that. Try increasing the 100 to something like 1000.

0

Yeah, errors?

0

No Errors, I will try the humanoidrootpart now

0

i also only use R15

0

Still doesn't work

0

try using :FindFirstChildOfClass("Humanoid")

0

Nope still doesn't work

0

If there are no errors it's either working (but not as intended) or not running. You can print something on line 1 to see if it is. If it's not it's either disabled or misplaced. Check the wiki for the script types to see where they can run.

0

I have tested print, it prints everything. The script type is server script and it is inside the right part