|
| 17 May 2017 03:07 PM |
| So I have this script inside a block, I can't use a local script because u can't use local scripts in blocks. I need to locate the local player but how? |
|
|
| Report Abuse |
|
|
|
| 17 May 2017 03:07 PM |
function onTouch() print("Clicked") if game.Workspace.DJBooth.Sound.Playing == false then game.ReplicatedStorage.Music:Clone().Parent = game.Players.LocalPlayer.PlayerGui elseif game.Workspace.DJBooth.Sound.Playing == true then end end script.Parent.MouseButton1Down:connect(onTouch)
|
|
|
| Report Abuse |
|
|
|
| 17 May 2017 03:08 PM |
when will u kids learn
THERE IS NO LOCAL PLAYER IN REGULAR SCRIPTS those run on the server LOCAL SCRIPTS RUN ON THE CLIENT, and the client they run on is known as the local player |
|
|
| Report Abuse |
|
|
|
| 17 May 2017 03:08 PM |
function onTouch() print("Clicked") if game.Workspace.DJBooth.Sound.Playing == false then game.ReplicatedStorage.Music:Clone().Parent = game.Players.LocalPlayer.PlayerGui elseif game.Workspace.DJBooth.Sound.Playing == true then end end script.Parent.MouseButton1Down:connect(onTouch) |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 17 May 2017 03:44 PM |
game.Players.LOcalPlayer doesn't work.......................
thats only for the LocalScripts actually. |
|
|
| Report Abuse |
|
|