What im trying to do is a player touches a brick and a cutscene plays. But after it play I dont want it to play for the player again. But if someone else touches it I want it to play. I have no clue on how to do this so I have no script to go off of.
✓ ANSWER ACCEPTED
How can I make it so that once a script runs for a player only once ?
1 answer
✓ Accepted answer
Basically you do this... (If stuff looks strange in this script, click the "raw" button above this code if there is more code)
local HasTouched = Instance.new("IntValue", game:GetService("Players").LocalPlayer)
HasTouched.Value = 0
function cutscene()
if HasTouched.Value == 0 then
--cutscene script here
HasTouched.Value = 1
end
end
paste your cutscene script under if HasTouched.Value == 0 then and above HasTouched.Value = 1
That should work..
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
What are you trying to do?
I think you should move the script to StarterPlayerScripts :V
What im trying to do is a player touches a brick and a cutscene plays. But after it play I dont want it to play for the player again. But if someone else touches it I want it to play.
You mean functions, Just call the function ex. brick.touched:connect(FunctionName). You could make the whole script into a function just put that part last and Start with the first line with function ex. FunctionName() --Enter Script-- end brick.touched:connect(FunctionName())