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

Can the local script acess the serverscriptservice?

Hello I want to make a start and a stop button that will trigger the intValue in ReplicatedStorage. And in the serverscript service it checks is the intvalue is 1 or 0 if it is 1 it start, 0 it stops. But I am having an issue with the start and stop button not working please help me on my script. And yes I tried bool value.

local StartButton  = script.Parent.StartButton
local StopButton = script.Parent.StopButton
local UniValue = game.ReplicatedStorage.UniValue

StartButton.MouseButton1Down:Connect(function()
	UniValue = true
	StartButton.Visible = false
	StopButton.Visible = true
end)

StopButton.MouseButton1Down:Connect(function()
	UniValue = false
	StopButton.Visible = false
	StartButton.Visible = true
end)

My Gui script. So my question is Can the local script acess the serverscriptservice and the bool value? Thanks

4 comments

0

Its cuz you are not sending a value to the remote event labelled "UniValue", you are just setting its value to false or to true. Instead, do UniValue:FireServer(false) or UniValue:FireServer(true)

0

try this

0

ok thanks

1 answer

✓ Accepted answer

No they can t. Local scripts cannot access server scripts the only way to do that is to use a remote event.

1 comment

0

Even hints by its name!

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