Hello, im a novice scripter and im trying to create a image button that changes to the image of the faction to indicate that a flag was captured by that faction, the script works in solo only as the title says, but not on team test for some unknown reason
the following server script is the main script that i made, however what i have realise is that it doesnt even print that the player captured it, the server script is in serverscriptservice
note: im also new to dev forum and i have no idea how to close this post when i find the answer
ProximityPrompt.Triggered:Connect(function(plr)
print("player captured")
if plr.Character.Humanoid.Health ~= 0 then
if NeutralizedV.Value == false then
if plr.Team == Teams.Kiessa then
local thumbnail = Owners.Kiessa
print("kiessa captured")
Values.Owner.Value = "Kiessa"
changecolor:FireAllClients("Kiessa")
print("sent remote event to changecolor")
event:FireAllClients(thumbnail)
elseif plr.Team == Teams.WhiteSun then
local thumbnail = Owners.WhiteSun
Values.Owner.Value = "Order of the White Sun"
event:FireAllClients(thumbnail)
print("sent")
else
print("error team not found")
end
else
print("value is true")
end
else
print("player health is 0")
end
dont mind the changecolor remote event, its for another part of the script which i couldn’t even get it to work (also gui)
i haven’t tested if it can triggers in a local script
but the server script is the one that listen to it, i will try to write a small test on local rn