Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Script does not move player. Any fixes?

Asked by 5 years ago
Edited 5 years ago

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!

0
Is this in a script or local? xPolarium 1388 — 5y
0
It's a server-side script User#16405 0 — 5y
0
connect is deprecated, use Connect User#19524 175 — 5y
0
nevermind didn't work User#16405 0 — 5y
View all comments (9 more)
0
Any errors? Change "UpperTorso" to "HumanoidRootPart" since R6 and R15 characters both have that. Try increasing the 100 to something like 1000. xPolarium 1388 — 5y
0
Yeah, errors? Aimarekin 345 — 5y
0
No Errors, I will try the humanoidrootpart now User#16405 0 — 5y
0
i also only use R15 User#16405 0 — 5y
0
Still doesn't work User#16405 0 — 5y
0
try using :FindFirstChildOfClass("Humanoid") User#23365 30 — 5y
0
Nope still doesn't work User#16405 0 — 5y
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. gullet 471 — 5y
0
I have tested print, it prints everything. The script type is server script and it is inside the right part User#16405 0 — 5y

Answer this question