Recently I’ve been working on a fighting game called strife stadium , i’ve got the base combat sorted but need to get character specific abilities done. Since i’ve got a character shop already done i’ve been able to insert a value in each character to tell the script what the players character is but it claims that the value dosnt exist
Ive checked and it does appear in the character i dont know whats wrong heres my code
local player = game.Players.LocalPlayer
local char = player.Character
if char.StrifeChar.Value == "GOT" then
script.GOT.TestProjectileOne.Disabled = false
end
if char.StrifeChar.Value == "Alpha" then
script.GOT.TestProjectileOne.Disabled = true
end
It works by looking for the value in their character then looks in the script for the ability on activates it but its not working pls help.
PS:This is in the starter pack
~Neptune
If you’re inserting a value inside the Character on the server and then checking for it on the client, then this won’t work as the Character is NetworkOwned by the client and therefore the value added inside the Character won’t replicate to the client.
Why would I need to change the value it looks for the value to change the players moves in the starter gear
The characters are stored in a folder in ServerStorage btw
Thing is I put the values in the characters in the storage in ServerStorage so that when they buy them/equip them their character is changed to it so the value is the one in the character model
A couple things. First off, when you refer to the player.Character it will assume you mean the player’s actual character, not anything that is in ServerStorage. On top of that, local scripts can’t see the ServerStorage. The whole difference between local and server scripts is that local scripts can only use anything in the Replicated Storage while Server Scripts can use ServerStorage and ReplicatedStorage. Can I see your script where you add it to ServerStorage maybe I could help you change both of your scripts to make it work.
First of all no script adds it server storage hey are just there and the shop requires them . Second of all the characters by shop are swapped with the players char