Im trying to make an rebirth system and i dont know what is wrong with my script?
Asked by
4 years ago Edited 4 years ago
01 | local replicatedStorage = game:GetService( "ReplicatedStorage" ) |
02 | local addNewRebirthEvent = replicatedStorage( "AddRebirth" ) |
03 | local event = Instance.new( "RemoteEvent" ) |
04 | event.Name = "AddStats" |
05 | event.Parent = game.ReplicatedStorage |
07 | event.OnServerEvent:Connect( function (plr) |
08 | local Taps = plr.leaderstats.Taps |
09 | Taps.Value = Taps.Value + 1 |
12 | game.Players.PlayerAdded:Connect( function (plr) |
13 | local is = Instance.new ( "Folder" ) |
14 | is.Name = "leaderstats" |
15 | local Taps = Instance.new ( "NumberValue" , is) |
21 | local function prepareToUpdateRebirth () |
26 | addNewRebirthEvent.OnServerEvent:Connect(prepareToUpdateRebirth)||` |
17:37:12.856 - ServerScriptService.Script:2: attempt to call a Instance value
17:37:12.859 - Stack Begin
17:37:12.861 - Script 'ServerScriptService.Script', Line 2
17:37:12.862 - Stack End