Help with remote event script

You are setting the Material = ("Neon") you have to set it like this:
Material = Enum.Material.Neon

2 Likes

Its supposed to be math.random(1,5)

1 Like

thanks for telling me that i didnt realize it

its not changing to neon when i do it

If iā€™m not mistaking if you only specify one argument then it defaults to a min of 1

Edit: NVM it defaults to 0

Show the script and also add print(Buttons)


what did you want me to put?

right after local Buttons = math.random(1,5)
add this:
print(Buttons)

Its better to use elseif instead of ending ending each ifs when they fall into the same catergory

what will print(Buttons) do if i add it?

It will print the value of Buttons

Send the script but not a picture of it, just copy paste it and use ```

local BloxyColaButton = script.Parent.BloxyColaButton
local BurgerButton = script.Parent.BurgerButton
local FriesButton = script.Parent.FriesButton
local PizzaButton = script.Parent.PizzaButton
local TacoButton = script.Parent.TacoButton

game.ReplicatedStorage.CustomerOrder1.OnClientEvent:Connect(function()

local Buttons = math.random(1,5)
print(Buttons)

if Buttons == 1 then
	BloxyColaButton.Material = Enum.Material.Neon
end

if Buttons == 2 then
	BurgerButton.Material = Enum.Material.Neon
end

if Buttons == 3 then
	FriesButton.Material = Enum.Material.Neon
end

if Buttons == 4 then
	PizzaButton.Material = Enum.Material.Neon
end

if Buttons == 5 then
	TacoButton.Material = Enum.Material.Neon
end

end)

its not printing anything in the output

Is the proximity prompt script a server script or local script?

server script, and its in server script service

try :FireAllClient() for the remote event in proximity script

1 Like

what do you mean? where do i put FireAllClient()

what do i do with that line FireAllClient() ?

The proximity script, where you said :FireClient()