I've been trying to figure this out for days. Some people have told me I need to use a remote event, which I've tried but possibly got the syntax incorrect, others have told me I don't need one and that I should be able to it all server side. I can't figure out the issue so I'm asking this forum. It's a coffee script that's supposed to rename the tool, change the transparency of the 'drink' brick inside the tool to 0 and the brick color to whatever the drink should be. It all works perfectly in studio but not outside of studio, and it works outside of studio if it's in experimental mode. I have no idea what the issue is or how I would even go about using a remote event for this if I need one, I just can't wrap my head around the usage even though I've looked at the wiki pages for hours. I'm desperate at this point, I feel like I've tried everything. This is an example script for the milk steamer:
function makeLatte(cup)
print(cup.Name)
if cup.Parent.Name == "Espresso" then
print("Espresso")
cup.Parent.Name = "Latte"
cup.Parent.Drinkk.BrickColor = script.LatteColor.Value -- LatteColor, MilkColor, and MochaColor are BrickColorValues that are children of the script.
cup.Parent.Drinkk.Transparency = 0
elseif cup.Parent.Name == "EmptyCup" then -- EmptyCup is the default name of the tool.
print("EmptyCup")
cup.Parent.Name = "SteamedMilk"
cup.Parent.Drinkk.BrickColor = script.MilkColor.Value
cup.Parent.Drinkk.Transparency = 0
elseif cup.Parent.Name == "Chocolate Syrup" then
print("Chocolate Syrup")
cup.Parent.Name = "Hot Chocolate"
cup.Parent.Drinkk.BrickColor = script.LatteColor.Value
cup.Parent.Drinkk.Transparency = 0
elseif cup.Parent.Name == "Chocolate Espresso" then
print("Chocolate Espresso")
cup.Parent.Name = "Mocha"
cup.Parent.Drinkk.BrickColor = script.MochaColor.Value
cup.Parent.Drinkk.Transparency = 0
end
end
script.Parent.Touched:Connect(makeLatte)
Extra info: the script itself is not a local script, it's located within the block that must be touched for the script to run, which is an invisible non-colliding brick within the milk steamer. Please, any help is appreciated.

5 comments
When did you define what cup is?
Cup is the argument - it's whatever is touching the brick the script is within.
And yes, this should all be done server side (unless, that is, you only want the events to occur for a specific player).
Oops, my bad. My having only 2 brain cells and my IQ of 3 aren't much of a help.
Oh, thanks! And no problem at all, haha.