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

Touched function in a localscript wont work?

local Stage1 = script.Parent
local Reset = Instance.new("BoolValue")
Reset.Parent = Stage1
Reset.Name = "StageReset"
Reset.Value = false
local Start = Stage1.StartPart
local Finish = Stage1.FinishPart

Finish.Touched:connect(function()
	print"Finished"
	if Reset.Value == false then
		Reset.Value = true
		Stage1.Target1.ColorPart1.BrickColor = "Really red"
		Stage1.Target1.ColorPart2.BrickColor = "Really red"
		Stage1.Door1.Transparency = 0.8
		Stage1.Door1.Script.Disabled = false
		Stage1.Door1.CanCollide = true
	end
end)

1 answer

✓ Accepted answer

This should be in a regular script if it is on the server side.(in the workspace.) localscripts are only used on the client side(in the player or in the character.)

The touched event is already serverside so you do not need remote events or anything. just change the script to a regular old script.

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