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

The part trips the player in studio, but not in the actual game. Why?

Asked by 8 years ago
Edited 8 years ago

I have a part placed in Workspace, and here is the Server Script. It is meant to trip any players on touch!

local effectTime = 2

script.Parent.Touched:Connect(function(hitPart)
    local h = hitPart.Parent:FindFirstChildOfClass("Humanoid")
    if h then
        h:ChangeState(Enum.HumanoidStateType.FallingDown)
        wait(effectTime)
        h:ChangeState(Enum.HumanoidStateType.PlatformStanding)
    end
end)

In Studio, the script works fine, but in the actual game, the script did not do anything to the player. Also, there are no errors or warning messages in the Developer Console/Output.

Also, the game is FilteringEnabled!

What should I do? Any help will be appreciated! :)

0
Try using a local script? TheUniPiggy 77 — 8y
0
no it is FE! Plus, i might find it weird... starlebVerse 685 — 8y
0
Oh, its FE. You should add that into your question. TheUniPiggy 77 — 8y
0
there it is updated! starlebVerse 685 — 8y
View all comments (3 more)
0
k TheUniPiggy 77 — 8y
0
What does "FE!" mean? GeezuzFusion 200 — 8y
0
FilteringEnabled = true RubenKan 3615 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

I think your problem is on line 3

where it says "Connect" the 'c' needs to be lowercase so it should look like

script.Parent.Touched:connect(function(hitPart)
0
plus filtering enabled isn't needed information because you're using a server script DeveloperSolo 370 — 8y
0
1. nope it does not work. 2. :connect() is now deprecated. http://wiki.roblox.com/index.php?title=RBXScriptSignal#Methods starlebVerse 685 — 8y
0
Wow, I never knew connect was deprecated. Then I don't know what wrong. It looks perfectly fine. DeveloperSolo 370 — 8y
0
https://www.roblox.com/games/278433318/CStarLams-Play-Place you can take a look at the problem in here. Try stepping on the red foil brick to look at the issue. starlebVerse 685 — 8y
View all comments (5 more)
0
The permission levels on this place prevent you from entering. DeveloperSolo 370 — 8y
0
whoops wait a sec... starlebVerse 685 — 8y
0
ok the place is now for everyone! starlebVerse 685 — 8y
0
I knew the reason why! For some humanoid states, it only works with a local script! starlebVerse 685 — 8y
0
ahh. good thing you figured it out! -- 19 days later lol DeveloperSolo 370 — 8y
Ad

Answer this question