Hello, i looked in many places but could not find something that worked for me. I have a script in starterplayerscripts and i have a bool value inside the script and its named "Value" and i cant set it it wont work when test it, why?
script.Parent.Parent.Chatted:Connect(function(msg) if msg == "KAMEHAMEHA" then if can == true then can = false script.Value.Value = true --[=[This Content was deleted as this big script can be copied without a trace of the person since they can easily also take out my name in the script]=] can = true end end end)
This might be incorrect syntax but the real thing works. exept for the value, its not setting value to true. please help <:)
Alright, so I looked at this script, and after testing it, it works perfectly fine as it is, i used the line
local can = true
to check this.
(My Version, essentially the same thing)
local can = true local player = script.Parent.Parent player.Chatted:Connect(function(msg) if msg == "KAMEHAMEHA" then if can == true then can = false script.Value.Value = true -- Content Removed can = true end end end)
The problem I'm guessing is that you are using a Server Script In the StarterPlayerScripts, where only Local Scripts can be run. I'm not sure how this may/may not mess up your other functions, but doing this will fix the section provided.
If you don't want this function to occur again though, I'm not sure why you'd set "can" back to true.
Closed, not really because i cant but i Am just gonna abandon this question since i don't need it anymore