Hello all! So, I've been frustrated with my script, since it didn't properly function. The script below is supposed to make the person jump if they aren't in the group. It works the first time, but after that, they never jump again. I've tested it in studio, setting up prints, and the code runs all the way through. Is there reason I can't perform the jump more than once? Thanks for any help!
Script:
GroupID = 2549890 function onSit(player, character) if not player then return end if not player:IsInGroup(GroupID) then player.Character.Humanoid.Jump = true wait(.1) end end function onGetUp(player, character) if not player then return end end script.Parent.ChildAdded:connect(function (c) if c:IsA("Weld") and c.Name == "SeatWeld" then local char = c.Part1.Parent sitter = char onSit(game.Players:GetPlayerFromCharacter(char), char) end end) script.Parent.ChildRemoved:connect(function (c) print('55') if c:IsA("Weld") and c.Name == "SeatWeld" then local char = c.Part1.Parent sitter = nil onGetUp(game.Players:GetPlayerFromCharacter(char), char) end end)
Locked by Redbullusa, UserOnly20Characters, alphawolvess, and EzraNehemiah_TF2
This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.
Why was this question closed?