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

Script working in studio, but not in a game?

I have these in Scripts, and the problem is in the Title. Do I need to change them over to LocalScripts?

local sp = script.Parent
local shirt = sp.Parent.Parent.Parent.Parent.Model:WaitForChild("Shirt")
print 'Found Shirt!'
local value = sp.Parent.Parent.Parent.Parent.Model:WaitForChild("ShirtValue")
print 'Found Value!'

function textureChange()
	shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=169494949"
	value.Value = "169494950"
end
sp.MouseButton1Down:connect(textureChange)

1 answer

Usually when a script works in PlaySolo mode but not online means it's meant to be a local script. I recommend changing this script to a local one if it's not already. The reasoning behind this is because PlaySolo runs locally while online has Server scripts and Local Scripts. I'm assuming this is for a text/image button so use local scripts!

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