soooo i am making a roblox horror game and i have made a script.
the script is suposed to run a local script after being clicked...
but the local script wont run after watching many tutorials on youtube.
please help me.
i really want to finish my game
ALL CODE USED:
USES REMOTE EVENTS
if clicked normal script{
local RS = game:GetService("ReplicatedStorage")
local ButtonClicked = RS:WaitForChild("PlayButtonShow")
function Clicked(Player)
local button = script.Parent.PlayButton:Clone()
button.Parent = Player.PlayerGui
ButtonClicked:FireClient()
end
script.Parent.ClickDetector.MouseClick:Connect(Clicked)
}
local script{
local RS = game:GetService("ReplicatedStorage")
local ButtonClicked = RS:WaitForChild("PlayButtonShow")
function Run()
game.StarterPlayer.CameraMaxZoomDistance = 10
game.StarterPlayer.CameraMinZoomDistance = 10
end
ButtonClicked.OnClientFunction:Connect(Run)
}

2 comments
Is this a RemoteEvent or a RemoteFunction? Where is the local script located?
the local script is in a file i made and i uses a remote event and put it in replicated storage