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

My Third Person Front script ain't working, can anyone help me?

Asked by 5 years ago

My Third Person Front script ain't working and I am not sure Third Person but front is possible... Anyways, here is the script and let me know what I've done wrong.

script.ThirdPersonFrontLock:clone().Parent = game.StarterGui
script:Destroy() -- It is simple as heck but ain't working at all.
0
Can you give us the code....? unmiss 337 — 5y

1 answer

Log in to vote
1
Answered by
valchip 789 Moderation Voter
5 years ago

Add a PlayerAdded event so this thing only occurs only when a player joins and instead of adding this to the startergui we will directly add this to their PlayerGui.

game.Players.PlayerAdded:Connect(function(player)
    x = script.ThirdPersonFrontLock:Clone()
    x.Parent = player.PlayerGui
end)

Also use :Clone() not :clone() because the not capitalized clone is deprecated. By the way the problem of the script is that if you reset the script will be gonne and won't be anymore in the PlayerGui. But that is all you wanted from what you said on top. But if you want the script to be there anytime you can just check if the script is there and if not it will :Clone() the script and add it to the PlayerGui.

Ad

Answer this question