Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Local Player is nil.. Help? [SOLVED]

Guys I need help with this error that has been messing me up since I got it for the first time. Basicly the script works in studio perfectly. But, in game when I click the "Part" it says that "LocalPlayer" is a nil value..

Here's the script:

script.Parent.ClickDetector.MouseClick:connect(function()
	script.Disabled = true
	local backup= game.Players.LocalPlayer.PlayerGui.CatchStuffMinigame:Clone()
game.Players.LocalPlayer.PlayerGui.CatchStuffMinigame.Background:TweenPosition(UDim2.new(0,600,0,100),"In","Linear",2)
wait(10)
game.Players.LocalPlayer.PlayerGui.CatchStuffMinigame.Background:TweenPosition(UDim2.new(0,-400,0,100),"Out","Linear",2)
wait(2)
game.Players.LocalPlayer.PlayerGui.CatchStuffMinigame:Remove()
backup.Parent = game.Players.LocalPlayer.PlayerGui
wait(20)
script.Disabled = false
end)

If anyone could help me it would be GREAT!

2 comments

0

Youre gonna need to use a remote function or remote event. There complex but they help a lot.

1 answer

Its probably because your using a script use a local script

4 comments

0

Neh last time i copied the whole script and paste it and testing local script and script it one by one all i saw is this

0

00:08:10.335 - CatchStuffMinigame is not a valid member of PlayerGui

0

I'll try the so local script.. I don't think it's gonna do much to be honest.

0

As I expected. It didn't work

This discussion is preserved as it was. New answers, comments, and votes are closed.