Need basic help with touchedevent not firing remotevent

I was wondering if anyone had the solution to my problem. Every time I try and run this script it always gives me the same error code: "TouchePart is not a valid member of Workspace “Workspace”
I’ve tried to tinker with the script however I am a very beginner scripter and every time it has said the same message.

The script is supposed to detect any player touching the part. Once someone touches the part it fires the remoteevent. Supposed to be simple, has been causing lots of problems.

Here’s the most recent change of the script:

    game.Workspace.TouchePart.Touched:Connect(function()
            game.ReplicatedStorage.DayOneTouch:FireServer()
        end)

ALSO:
yes, the part is called TouchePart and is anchored
the LocalScript is in StarterGui
DayOneTouch is my RemoteEvent

Try using game.Workspace:WaitForChild("TouchePart"), it may be created later than the script
If it gives a warning of Infinite yield possible then it takes too long to be spawned or you intentionally have it spawned later

1 Like