for some reason it doesn’t check the string even tho the print works and prints the string? the string is set correctly and the server prints it but if statement doesn’t work?
i set the string value on client and the server receives it properly but either im formating the if statement wrong or there is something wrong with it.
local rs = game:GetService("ReplicatedStorage")
local ts = game:GetService("TweenService")
local event = rs.RitualEvent
local tweeninfo = TweenInfo.new(
0.4,
Enum.EasingStyle.Cubic,
Enum.EasingDirection.Out,
0
)
local derbis = game:GetService("Debris")
event.OnServerEvent:Connect(function(player,god,model)
print(god)
local marking = Instance.new("Decal")
marking.Transparency = 1
marking.ZIndex = 2
marking.Parent = model
marking.Face = Enum.NormalId.Top
local tween = ts:Create(marking,tweeninfo, {Transparency = 0})
local Distance = (model.Position - player.CharacterAdded:Wait().HumanoidRootPart.Position).Magnitude
derbis:AddItem(marking,5)
if god == "Hope" then
player.Character.Affinity.Hope.Value = player.Character.Affinity.Hope.Value + 1
marking.Texture = "rbxassetid://12895398403"
tween:Play()
end
if god == "Love" then
player.Character.Affinity.Love.Value = player.Character.Affinity.Love.Value + 1
marking.Texture = "rbxassetid://12897510489"
tween:Play()
end
if god == "Destruction" then
player.Character.Affinity.Destruction.Value = player.Character.Affinity.Destruction.Value + 1
marking.Texture = "rbxassetid://12897507045"
tween:Play()
end
end)