Script working fine on Studio but not on Roblox Player. Is there any solution to this?
I was making a script builder and when I used the execute button, it errored stating that P is not a valid member of the controller
. In Studio, it works fine, but it makes errors on the Roblox Player. I used Studio's play mode, the script type is a local script, and the location is in a proper place (StarterGui).
What I expect is that the script executes just fine depending on the location (Client, server), but it actually errors stating that P is not a valid member of the controller
in line 1 with the exception in Studio.
01 | local text = script.Parent.Parent.Content.ServerCode |
02 | local ActiveSide = script.Parent.Parent.ActiveSide |
03 | local Server = script.Parent.Parent.Server |
04 | local Client = script.Parent.Parent.Client |
05 | local RelplicatedStorage = game:GetService( "ReplicatedStorage" ) |
06 | local loadstringclient = require(RelplicatedStorage.Loadstring) |
08 | script.Parent.MouseButton 1 Click:Connect( function () |
09 | if ActiveSide.Value = = Server then |
10 | game:GetService( "ReplicatedStorage" ).ExecuteServer:FireServer(text.ContentText) |
11 | elseif ActiveSide.Value = = Client then |
12 | loadstringclient(text.ContentText)() |