#[NewScripter] How do i make it so when i click my Gui "Restart" it fires the function "DiceRoller"

42 messages · Page 1 of 1 (latest)

clear locust
#

ignores dices i was testing something

winter eagle
clear locust
winter eagle
clear locust
#

ok

clear locust
#

i got the remote event but idk how to make it do anything

winter eagle
#

Have client fire them and connect OnClientEvent to the DiceRoll function on server

#

Basically declare the remote in both scripts

#

Then have Remote:FireServer() on the local script

#

Then Remote.OnClientEvent:Connect(DiceRoller) on server

clear locust
winter eagle
winter eagle
#

Server = white, local = blue

clear locust
#

remote is game.ReplicatedStorage.RemoteEvent ?

clear locust
winter eagle
clear locust
#

ok

clear locust
winter eagle
#

It doesn’t have to be known in that script

#

You fire the remote event. Then the server will just check for a signal from the remote event and then fire the function in itself

clear locust
#

like this ?

#

it saying that onclientevent can only be used on the client

#

also the variables maingui and restart i have deleted because it wa causing bugs

winter eagle
clear locust
#

switching it to onserverevent doesnt make it go back to its position

#

i think it because i need to add that onto my script tho

winter eagle
clear locust
winter eagle
#

If you want them to reset then you’ll need to save the starting orientations in a variable

clear locust
#

i cant

#

oh wait

#

i meant the position, but the oriantation needs to be random

#

also the event fires by itself without me clicking any buttons

tender birchBOT
#

studio** You are now Level 4! **studio

clear locust
#

oh i fixed that bug

#

ok seems to work now